var fs = require('fs'),
  hyacinth = require('fwowo-hyacinth');

// 打包
hyacinth.pack({
  src: __dirname + '/src',
  dist: __dirname + '/dist',
  log: __dirname + '/pack.log',
  callback: function(){
    // 打包完成修改时间戳
    /*
    fs.readFile('./dist/index.html', 'utf8', function(error, source){
      var _source = source.replace(/(\?|\&)\_t\=(.*?)(\"|\&)/gi, '$1_t='+(+ new Date())+'$3');
      fs.writeFile('./dist/index.html', _source, 'utf8', function(){
        console.log('> 更新 index.html 时间戳完成');
      });
    });
    */
  }
});
